package com.lxt;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
// 扫描 mybatis 通用 mapper 所在的包
@MapperScan(basePackages = "com.lxt.mapper")
// 扫描所有包以及相关组件包
@ComponentScan(basePackages = {"com.lxt", "org.n3r.idworker"})
public class Application {

    final static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(Application.class);
        Environment env = application.run(args).getEnvironment();
        logger.info("启动成功了，端口号是：" + env.getProperty("server.port"));
    }
}
